#include "threadPool.h"

// 处理pwd命令，即传输虚拟path
int pwd_work(const client_info_t *client_info)
{
    char p[1024] = {0};
    strcpy(p, client_info->virtual_global_path);
    int len = strlen(p);  // 获取字符串长度
    if (len > 0) {
        p[len - 1] = '\0';  // 将最后一个字符替换为字符串结束符
    }
    len = strlen(p);
    send(client_info->netfd, &len, sizeof(int), MSG_NOSIGNAL);
    send(client_info->netfd, p, len, MSG_NOSIGNAL);

    return 0;
}